package com.easygo.goods.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.easygo.goods.service.ItemCatService;
import com.easygo.pojo.ItemCat;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 徐策
 * @date 2020/1/4 15:15
 */
@RestController
@Scope("prototype")
public class ItemCatController {
    @Resource
    ItemCatService itemCatService;

    /**
     * 01-全部查询商品分类
     * @return
     */
    @GetMapping("/itemcat_list")
    public List<ItemCat> getItemCatList(){
        return itemCatService.list(new QueryWrapper<ItemCat>().eq("del","0"));
    }





}
